/**
 * 
 */
package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author dxpeng 2013-8-8 下午6:32:41
 */
public enum OperatorsStatus {
	//状态 00 正常 01 待审核 02 注销 03待复审 04 信息不完全
	 OK("正常", "00"),
	 WAIT_AUDITING("待审核", "01"),
	 CANCEL("已注销","02"),
	 WAIT_RE_AUDITING("待复审", "03"),
	 INCOMPLETE_INFO("补齐材料", "04"),
	 REFUSED("审核未通过", "05");	 
	 
	 
	 
	 
	 
	private String code;
	private String name;
	private boolean editAble;
	private boolean enabled;

	private OperatorsStatus( String name,String code) {
		this.code = code;
		this.name = name;
		
	}

	public boolean isEditAble() {
		return editAble;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static OperatorsStatus valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("SysLogType code " + code
					+ " is blank");
		}
		for (OperatorsStatus ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("SysLogType code " + code
				+ " is not exist");
	}

}
